package net.spunofbook.negocio;

import java.util.List;

import net.spunofbook.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;

public class VendaAdapter extends BaseAdapter {

	/*	Ajeitar TUDO	*/
	
	private Context context;
	private List<Venda> vendas;
	
	public VendaAdapter (Context context, List<Venda> vendas) {
		this.context = context;
		this.vendas = vendas;
	}
	
	@Override
	public int getCount() {
		return vendas.size();
	}

	@Override
	public Object getItem(int position) {
		return vendas.get(position);
	}

	@Override
	public long getItemId(int position) {
		return vendas.get(position).getIdVenda();
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {

		final int auxPosition = position;

		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		final LinearLayout layout = (LinearLayout) inflater.inflate(R.layout.tela_venda_base_adapter, null);
		
		
	
		
		
		return layout;
	}

}
